#ifndef SETTINGS_H
#define SETTINGS_H

#include <QString>
#include <QSettings>
#include <QTime>

class Settings {
public:
    Settings(const QString &organization, const QString &application);

    void saveLastDirectories(const QString &source, const QString &target);
    void loadLastDirectories(QString &source, QString &target);
    void setAutoBackupEnabled(bool enabled);
    bool isAutoBackupEnabled() const;
    void setAutoBackupTime(const QTime &time);
    QTime getAutoBackupTime() const;
    void setAutoBackupInterval(int interval);
    int getAutoBackupInterval() const;

    QString getSourceDir() const;
    QString getTargetDir() const;

    void setSourceDir(const QString &sourceDir);
    void setTargetDir(const QString &targetDir);

    void save();
    void load();

private:
    QSettings *settings;
};

#endif // SETTINGS_H
